package com.xbongbong.admin.model.impl;

import com.xbongbong.admin.domain.dao.WorkOrderTemplateCategoryRetainDao;
import com.xbongbong.admin.domain.entity.WorkOrderTemplateCategoryRetainEntity;
import com.xbongbong.admin.model.WorkOrderTemplateCategoryRetainModel;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author guohui.zhang
 * @Title: 工单分类备份
 * @date 2020/3/1914:36
 */
@Service("workOrderTemplateCategoryRetainModel")
public class WorkOrderTemplateCategoryRetainModelImpl implements WorkOrderTemplateCategoryRetainModel {
    @Resource
    private WorkOrderTemplateCategoryRetainDao workOrderTemplateCategoryRetainDao;

    @Override
    public List<WorkOrderTemplateCategoryRetainEntity> findEntitys(Map<String, Object> param) {
        return workOrderTemplateCategoryRetainDao.findEntitys(param);
    }

    @Override
    public Integer insertBatch(List<WorkOrderTemplateCategoryRetainEntity> workOrderTemplateCategoryRetainEntities) {
        return workOrderTemplateCategoryRetainDao.insertBatch(workOrderTemplateCategoryRetainEntities);
    }

    @Override
    public Integer deleteBatch(List<Long> entities, String corpid) {
        return workOrderTemplateCategoryRetainDao.deleteBatch(entities,corpid);
    }
    /**
     * 根据备份应用id查询工单分类
     * @param retainAppId
     * @param corpid
     * @return
     */
    @Override
    public WorkOrderTemplateCategoryRetainEntity getCategoryByRetainAppId(Long retainAppId, String corpid) {
        return workOrderTemplateCategoryRetainDao.getCategoryByRetainAppId(retainAppId, corpid);
    }


}
